package com.it.util;

import java.io.*;
import java.net.URL;
import java.util.Properties;

public class PropertiesUtil {

    public static Properties prop = new Properties();

    static {
        try {
            prop.load(PropertiesUtil.class.getClassLoader().getResourceAsStream("config.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String key){
        return prop.getProperty(key);
    }

    public static int getMin() {
        return Integer.parseInt(prop.getProperty("min"));
    }

    public static int getMax() {
        return Integer.parseInt(prop.getProperty("max"));
    }

    public static int getResultMin(){return Integer.parseInt(prop.getProperty("resultMin"));}

    public static int getResultMax() {
        return Integer.parseInt(prop.getProperty("resultMax"));
    }


}
